<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
                    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <script src="../../scripts/jquery-1.3.1.js" type="text/javascript"></script>
 <script src="lib/jquery.livequery.js" type="text/javascript"></script>
  <script>
$(document).ready(function(){
   $('a').livequery('click', function(event) { 
        alert('livequery导致的点击'); 
        return false; 
    }); 

	$('a[rel*=friend]').livequery('click', function(event) { 
        alert('livequery匹配rel属性值中含有"friend"的A标签导致的点击'); 
        return false; 
    });

	$('a').click( function(){
		alert('普通的点击'); 
		return false; 
	});
	
	$(":button").click(function(){
		$("#test").attr("rel","another");
	});

	$("body").append('<p><a href="#">被动态创建的A标签包裹</a>');
	$("body").append('<p><a href="#" rel="friend1" id="test">被动态创建的rel属性值中含有"friend"的A标签包裹</a>');
});
  </script>
  
</head>
<body>
  <a href="#">被HTML页面中的a标签包裹</a>
  <button>修改rel属性的值</button>
</body>
</html>
